package Game.Players.Units;

/**
 * Created by sech_92 on 17.12.2014.
 */
public class LightMachines extends Unit {
    private int armor;
    Weapons[] weapon = {null, null};

    private LightMachines(String _name, int _health, int _armor, TLightMachines type) {
        name = _name;
        health = _health;
        armor = _armor;
        level = 4;
        squadSize = 1;
        Weapons.makeWeaponz(type, weapon);
    }

    public static LightMachines make(TLightMachines type) {
        LightMachines constr;
        switch (type) {
            case Dreadnought:
                constr = new LightMachines("Dreadnought", 1000, 30, type);
                break;
            case Hellhound:
                constr = new LightMachines("Hellhound", 1000, 30, type);
                break;
            case Support_Dreadnought:
                constr = new LightMachines("Support Dreadnought", 1000, 30, type);
                break;
            case Tomb_spider:
                constr = new LightMachines("Tomb spider", 1000, 30, type);
                break;
            case Defiler:
                constr = new LightMachines("Defiler", 1000, 30, type);
                break;
            case XV8_Crisis:
                constr = new LightMachines("XV8 Crisis", 1000, 30, type);
                break;
            case XV88:
                constr = new LightMachines("XV88", 1000, 30, type);
                break;
            case Wartrak:
                constr = new LightMachines("Wartrak", 1000, 30, type);
                break;
            case Killa_Can:
                constr = new LightMachines("Killa Can", 1000, 30, type);
                break;
            case Wraithlord:
                constr = new LightMachines("Wraithlord", 1000, 30, type);
                break;
            default:
                constr = new LightMachines("", 0, 0, null);
                break;
        }
        return constr;
    }

    public int getArmor(){
        return armor;
    }

    public void decreaseArmor(int a){
        armor -= (a < 0 ? 0 : a);
    }
}
